package Class;

public class Demo04 {
    public static void main(String[] args){
        /*
        * 计算1/2+2/3+...+10/11
        *

        double sum = 0.0;
        for(int i = 1;i<= 10 ; i++){
            sum = sum + (i*1.0)/(i+1.0);
        }
        System.out.println("结果是："+ sum);

        System.out.println("=====================");

      */
  double  sum = 0.0;
  int i = 1;
      do{sum = sum + (i*1.0)/(i+1.0);
       i++;
      }
      while(i<=10);

        System.out.println("结果是："+ sum);
    }
}



